<template>
    <el-collapse v-if="editField"  class="tay-collapse" accordion v-model="active">
        <el-collapse-item index="common" >
            <template slot="title" >
             通用属性
            </template>
            <Pub></Pub>
            <p>
              有不少其他答案说
            </p>
        </el-collapse-item>
        <el-collapse-item name="props">
            <template slot="title" >
             扩展属性
            </template>
            <Extend></Extend>
        </el-collapse-item>
        <el-collapse-item name="rules">
            <template slot="title" >
             校验设置
            </template>
            <Rules></Rules>
        </el-collapse-item>
        <el-collapse-item name="options" >
            <template slot="title" >
             选项数据
            </template>
            <Options></Options>
        </el-collapse-item>
    </el-collapse>
</template>


<script>

  import {mapState} from 'vuex'
  import Pub from './setting/pub'
  import Extend from './setting/extend'
  import Options from './setting/options'
  import Rules from './setting/rules'

  export default {
    components: {
      Pub,
      Extend,
      Options,
      Rules
    },
    data() {
      return {
        active: 'common'
      }
    },
    computed: {
      ...mapState(['editField'])
    }

  }
</script>
